<?php 
foreach ($this->coupons as $coupon) {
   // echo $coupon['count_all_code'].'  ';
    //echo $coupon['nominal'].'<br />';
}
?>
<!-- Page statistics and control buttons area -->
    <div class="statsRow">
        <div class="wrapper statsItems">
        
            <!-- Stats item -->
            <div class="sItem ordersStats">
                <h2><a title="" class="value"><?php echo $this->allcode['count']; ?><span>Codes</span></a></h2>
                <div class="statsDetailed" id="s4">
                    <div class="statsContent">
                        <div class="sElements">
                            <div class="sDisplay"><h4><?php echo $this->activated['count']; ?></h4><span>activated</span></div>
                            <div class="sDisplay"><h4><?php echo $this->notactivated['count']; ?></h4><span>not activated</span></div>
                            <div class="sDisplay"><h4><?php echo $this->blocked['count']; ?></h4><span>blocked</span></div>
                        </div>
                        <span class="line"></span>
                        <div class="statsUpdate">
                            <span>Next update in:</span>
                            <span>1 hr 19 min</span>
                            <div class="contentProgress"><div class="barG tipS" id="bar4" title="89%"></div></div>
                        </div>
                        <div class="statsDropBtn"><a href="#" class="button basic"><img src="/images/icons/dark/stats.png" class="icon" alt="" /><span>View statistics</span></a></div>
                    </div>
                </div>
                <span class="changes">
                    <span class="negBar" values="5,10,15,20,25,30,35,40,45,50"></span>
                    <span class="negative">+0.6%</span>
                </span>
            </div>
        </div>
    </div>
	<div class="line"></div>

    <!-- Main content wrapper -->
    <div class="wrapper">
    
        <!-- Dynamic table -->
        <div class="widget">
            <div class="title"><img src="/images/icons/dark/full2.png" alt="" class="titleIcon" /><h6>Dynamic table</h6></div>
            <table cellpadding="0" cellspacing="0" border="0" class="display dTable">
            <thead>
            <tr>
            <th>Серия</th>
            <th>Номинал</th>
            <th>Количество кодов</th>
            <th>Активированных кодов</th>
			<th>Дата генерации</th>
            <th>Скачать отчет</th>
            </tr>
            </thead>
            <tbody>
            <?php 
            if (!empty($this->coupons)) {
                foreach($this->coupons as $coupon) {             
                    echo '<tr class="gradeA">';
                    echo '<td>'.$coupon['series'].'</td>';
                    echo '<td>'.$coupon['nominal'].'</td>';
                    echo '<td>'.$coupon['all_series_code'].'</td>';
                    echo '<td>'.$coupon['all_activated_series_code'].'</td>';
                    echo '<td>'.date("d-m-Y",strtotime($coupon['date_generation'])).'</td>';
                    echo '<td><a class="button dblueB" style="margin: 5px;" title="" href="#"><span>отчет</span></a></td>';
                    echo '</tr>';
                }
            } 
            ?>
            </tbody>
            </table>  
        </div>
    </div>